{% extends "codeflow/browser/base.html" %}
{% block page_head %}
<link href="/media/prettify.css" type="text/css" rel="stylesheet" />
<script src="/media/scripts/prettify.js"></script>
<script src="/media/scripts/MochiKit.js"></script>
<script>
  addLoadEvent(prettyPrint);
</script>
{% endblock %}
{% block content %}
<h1>Browsing /{{ path }}</h1>
<div class="section">
  <h2>Content</h2>
  {% if content %}
  <pre class="prettyprint">{{ content|escape }}</pre>
  {% endif %}
  {% if entries %}
  <table width="50%">
    <!--
    <thead>
      <tr>
        <th>Name</th>
      </tr>
    </thead>
    -->
    <tbody>
      {% for entry in entries %}
      <tr class="{% cycle odd,even %}">
        <td><a href="{{ entry.relative_name }}">{{ entry.relative_name }}</a></td>
      </tr>
      {% endfor %}
    </tbody>
  </table>
  {% endif %}
</div>

{% if changesets %}
<div class="section">
  <h2>Last Changes</h2>
  <table class="fancy">
    <thead>
      <tr>
        <th>Changeset</th>
        <th>Date</th>
        <th>Author</th>
        <th>Log Message</th>
      </tr>
    </thead>
    <tbody>
      {% for changeset in changesets %}
      <tr class="{% cycle odd,even %}">
        <td><a href="/review/new/changeset/{{ changeset.scm_id }}/">{{ changeset.scm_id }}</a></td>
        <td>{{ changeset.date|date:"d-m-y H:i" }}</td>
        <td>{{ changeset.scm_user|escape }}</td>
        <td>{{ changeset.message|escape }}</td>
      </tr>
      {% endfor %}
    </tbody>
  </table>
</div>
{% endif %}
{% endblock %}

